package com.ruoyi.fantasy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fantasy.mapper.FantasyActiveConditionMapper;
import com.huanzhidadi.fantasy.bean.domain.FantasyActiveCondition;
import com.ruoyi.fantasy.service.IFantasyActiveConditionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 激活条件 服务层实现
 * 
 * @author wanghui
 * @date 2019-07-05
 */
@Service
public class FantasyActiveConditionServiceImpl implements IFantasyActiveConditionService 
{
	@Autowired
	private FantasyActiveConditionMapper fantasyActiveConditionMapper;

	/**
     * 查询激活条件信息
     * 
     * @param id 激活条件ID
     * @return 激活条件信息
     */
    @Override
	public FantasyActiveCondition selectFantasyActiveConditionById(Long id)
	{
	    return fantasyActiveConditionMapper.selectFantasyActiveConditionById(id);
	}
	
	/**
     * 查询激活条件列表
     * 
     * @param fantasyActiveCondition 激活条件信息
     * @return 激活条件集合
     */
	@Override
	public List<FantasyActiveCondition> selectFantasyActiveConditionList(FantasyActiveCondition fantasyActiveCondition)
	{
	    return fantasyActiveConditionMapper.selectFantasyActiveConditionList(fantasyActiveCondition);
	}
	
    /**
     * 新增激活条件
     * 
     * @param fantasyActiveCondition 激活条件信息
     * @return 结果
     */
	@Override
	public int insertFantasyActiveCondition(FantasyActiveCondition fantasyActiveCondition)
	{
	    return fantasyActiveConditionMapper.insertFantasyActiveCondition(fantasyActiveCondition);
	}
	
	/**
     * 修改激活条件
     * 
     * @param fantasyActiveCondition 激活条件信息
     * @return 结果
     */
	@Override
	public int updateFantasyActiveCondition(FantasyActiveCondition fantasyActiveCondition)
	{
	    return fantasyActiveConditionMapper.updateFantasyActiveCondition(fantasyActiveCondition);
	}

	/**
     * 删除激活条件对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteFantasyActiveConditionByIds(String ids)
	{
		return fantasyActiveConditionMapper.deleteFantasyActiveConditionByIds(Convert.toStrArray(ids));
	}
	
}
